package com.easy.platform.manage.controller;

import com.easy.common.util.Result;
import com.easy.platform.manage.service.PlatformService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: CoolPro
 * @Description:
 * @Time: 2024-04-28 17:20
 **/
@RestController
@CrossOrigin
@MapperScan("com.easy.platform.manage.mapper")
@RequestMapping("/platform")
public class PlatformController {
    @Autowired
    private PlatformService platformService;
    @GetMapping("/query")
    public Result getPlatformInfo(@RequestParam(defaultValue = "") String name) {
        return platformService.getPlatformInfo(name);
    }


    @GetMapping("/query/byUser")
    public Result getPlatformInfoByUserName(@RequestParam Integer userId){
        return platformService.findPlatformInfoByUserId(userId);
    }

}
